package com.案例;

import java.util.Scanner;

public class Demo02 {
    public static void main(String[] args) {
        Demo02 demo02 = new Demo02();

        //请输出字符串
        System.out.println("请输出字符串");
        Scanner scanner = new Scanner(System.in);
        String next = scanner.next();
        System.out.println(demo02.solve(next));

    }

    public String solve (String str) {
        if(str==null||str.length()==0){
            return null;
        }
        return new StringBuffer(str).reverse().toString();
    }
}
